<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>变量的作用域</title>
<script type="text/javascript">
	var a;       //该变量在函数外声明，作用于整个脚本代码
	function send(){
       a="欢迎来到";
       var b="传智播客";   //该变量在函数内声明，只作用于该函数体
       alert(a+b);
	}
</script>
</head>
<body>
<script type="text/javascript">
  send();
</script>
</body>
</html>
